import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:pinsanjiao
 * User: wangxin
 * Date: 2024-07-23
 * Time: 14:07
 */
public class text3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        int[] array = new int[6];

        while (t-- != 0) {
            for (int i = 0; i < 6; ++i) {
                array[i] = in.nextInt();
            }
            Arrays.sort(array);

            if (array[0] + array[1] > array[2] && array[3] + array[4] > array[5] ||
                    array[0] + array[2] > array[3] && array[1] + array[4] > array[5] ||
                    array[0] + array[3] > array[4] && array[1] + array[2] > array[5] ||
                    array[0] + array[4] > array[5] && array[1] + array[2] > array[3]) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }

}
